<template>
  <div
    style="position: fixed; right: 28px; bottom: 78px; z-index: 100; width: 46px; box-shadow: 0 2px 12px -5px; border-radius: 50%;margin-bottom: 10px">
    <el-button circle @click="toTop">
      <div
        style="font-family: 'Microsoft YaHei',serif; font-size: 12px; color: #2DB7A0; letter-spacing: 1px; text-align: center; line-height: 16px;">
        <div>
          <span>回到</span>
        </div>
        <div>
          <span>顶部</span>
        </div>
      </div>
    </el-button>
  </div>
</template>

<script>
export default {
  name: "ToTopButton",
  methods: {
    toTop() {
      this.$emit('to-top');
    }
  }
}
</script>

<style scoped>
.el-button {
  width: 100%;
}

.el-button.is-circle {
  padding: 6px !important;
}
</style>
